#ifndef __HEMS_CAN_DEF_H__
#define __HEMS_CAN_DEF_H__

#define HEMS_RECV_ID_STD_MAX_NUM 16
#define HEMS_RECV_ID_EXT_MAX_NUM 64
#define HEMS_RECV_ID_MAX_NUM (HEMS_RECV_ID_STD_MAX_NUM + HEMS_RECV_ID_EXT_MAX_NUM)

// 输入端口可选模式，需要跟HEC1016主控端的定义一致
#define	MODE_IN_AI5V      0
#define	MODE_IN_AI32V     1
#define	MODE_IN_AI20MA    2
#define	MODE_IN_AI30KOHM  3
#define	MODE_IN_DI_HIGH   4
#define	MODE_IN_DI_LOW    5

// HEM系列扩展IO模块运行状态
#define	STATUS_INITING           0x00
#define	STATUS_INIT_OK           0x01
#define	STATUS_RUNNING           0x02
#define	STATUS_SETINMODE         0x03
#define	STATUS_SETNODEID         0x04
#define	STATUS_SETBAUDRATE       0x05
#define	STATUS_SETAIDEADZONE     0x06
#define	STATUS_SETERRINTERVAL    0x07
#define	STATUS_SETAIINTERVAL     0x08
#define	STATUS_SETINMODE_OK      0x09
#define	STATUS_SETNODEID_OK      0x0a
#define	STATUS_SETBAUDRATE_OK    0x0b
#define	STATUS_SETAIDEADZONE_OK  0x0c
#define	STATUS_SETERRINTERVAL_OK 0x0d
#define	STATUS_SETAIINTERVAL_OK  0x0e

#endif // __HEMS_CAN_DEF_H__
